cmake_minimum_required(VERSION 3.16)
project(SqlOperation LANGUAGES CXX)

include(qt.cmake)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt5
    COMPONENTS
        Core
        Gui
        Widgets
        Sql
)
qt_standard_project_setup()

set(PROJECT_HEARER
    mainwindow.h
    #sqloperation.h
)
set(PROJECT_UI
    mainwindow.ui
    #sqloperation.ui
)
set(PROJECT_SOURCES
    mainwindow.cpp
    main.cpp
    #sqloperation.cpp
)

qt_add_executable(SqlOperation ${PROJECT_SOURCES} ${PROJECT_UI} ${PROJECT_HEARER})

set_target_properties(SqlOperation
    PROPERTIES
        WIN32_EXECUTABLE TRUE
)

target_link_libraries(SqlOperation
    PUBLIC
        Qt::Core
        Qt::Gui
        Qt::Widgets
        Qt::Sql
)
